<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="/sys-admin/css/general.css" rel="stylesheet" type="text/css">
<link href="/sys-admin/css/main.css" rel="stylesheet" type="text/css">
<script src="/sys-admin/js/jquery.js" type="text/javascript"></script>
</head>
<body>
<h1>
<span class="action-span"><a href="/sys-admin/action/cms/channel.php?met=addcategoryui">添加</a></span>
<span class="action-span1">分类频道管理</span>
</h1>
<div class="list-div" id="listDiv">
<table cellpadding="3" cellspacing="1">
  <tr>
    <th class="num">#</th>
    <th>名称</th>
    <th>分类</th>
    <th>模板</th>
    <th>标题</th>
    <th>关键字</th>
    <th>描述</th>
    <th>操作</th>
  </tr>
  <{foreach from=$channels item=channel name=i}>
  <tr id="c_<{$channel.channel_id}>">
	<td class="num"><{$smarty.foreach.i.index+1}></td>
	<td><{$channel.channel_name}></td>
	<td><{$channel.cat_name}></td>
	<td><{$channel.tp_name}></td>
	<td><{$channel.page_title}></td>
	<td><{$channel.page_keywords}></td>
	<td><{$channel.page_desc}></td>
	<td>
	<a href="javascript:delCatChannel(<{$channel.channel_id}>);">删除</a>
	<a href="/sys-admin/action/cms/channel.php?met=editcategoryui&id=<{$channel.channel_id}>">修改</a>
	<a href="/sys-admin/action/cms/block.php?met=blocklist&channelid=<{$channel.channel_id}>">内容块管理</a>
	</td>
  </tr>
  <{/foreach}>
</table>
</div>
<script type="text/javascript">
function delCatChannel(id){
	if(confirm("确定要删除该频道?")){
		$.get('/sys-admin/action/cms/channel.php?met=delete&id='+id+'&t='+(new Date().getTime()),null,function(result){
			if($.trim(result) == "1"){
				$('#c_'+id).remove();
				alert("频道删除成功");
			}else{
				alert("频道删除失败");
			}
		});
	}
}
</script>
</body></html>